﻿using Architecture.Api.Application.Commands.ImmuneInFormationCommand;
using Architecture.Domain.Services.Interface;
using Architecture.Domain.TraceabilityManage;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.ImmuneInFormationHandler
{
    public class ImmuneInFormationQueryInfoCommandHandler : IRequestHandler<ImmuneInFormationQueryInfoCommand, ImmuneInFormation>
    {
        private readonly ICultureService _cultureService;

        public ImmuneInFormationQueryInfoCommandHandler(ICultureService cultureService)
        {
            _cultureService = cultureService;
        }

        public async Task<ImmuneInFormation> Handle(ImmuneInFormationQueryInfoCommand request, CancellationToken cancellationToken)
        {
            return await _cultureService.GetImmuneInFormationInfo(request.iId);
        }
    }
}
